<template>
    <my-dialog v-model="visible" width="890px">
        <template v-slot:head>
            请选择感兴趣的类型
        </template>

        <dialog-body @close="closeHandler"></dialog-body>
    </my-dialog>
</template>

<script>
import dialogBody from './components/body';

export default {
    components: {
        dialogBody,
    },
    data: () => ({
        visible: false,

        onclose: null,
    }),
    computed: {
        
    },
    methods: {
        open(obj) {
            this.visible = true;
            this.onclose = obj.onclose || function() {};
        },
        close() {
            this.visible = false;
            
            try{
                this.onclose();
            } catch(e) {
                // e
            }
        },
        closeHandler() {
            this.close();
            this.$emit('close');
        },
    },
};
</script>

<style lang="scss" scoped>

</style>